#include "OSD_Display_String.H"
//==================================================================================

//==================================================================================
//void menu_page0_main_menu_display();
//void menu_page1_system_setup_display();
void menu_page2_display_setup_display();
void menu_page3_camera_setup_display();
void menu_page4_auto_sequence_display();
void menu_page6_event_setup_display();
void menu_page7_event_report_display();
//void Menu_Page0_Box_Display();
#if 0
void Up_Down_Font_display();
void Left_Right_Font_display(U8);
void Enter_Font_display(U8);
void Menu_Exit_Font_display(U8);
#endif
//void Select_Font_display(U8);

//void Adjust_Font_display(U8);
//void Mask_Font_display();
//void Unmask_Font_display();
//void Enable_Font_display(U8);
//void Disable_Font_display();
//void Common_Font_display();
//void Clear_Font_display(U8, U8);
#if 0
//==================================================================================
//
//
//
//
//
//==================================================================================
//... Page0 Menu Description
void menu_page0_main_menu_display()
{
	U8 N_P = 0;
	
	RemoveOSDFnt(0, 0, 89, 287);  
	WriteAsicByte(ALL_CHIP,DVC_PG2, 0x60, 0x00);			//... 2D Box On/OFF for 2DB0 for tw2835
	WriteAsicByte(ALL_CHIP,DVC_PG2, 0x68, 0x00);			//... 2D Box On/OFF for 2DB1 for tw2835
	WriteAsicByte(ALL_CHIP,DVC_PG2, 0x70, 0x00);			//... 2D Box On/OFF for 2DB2 for tw2835
	WriteAsicByte(ALL_CHIP,DVC_PG2, 0x78, 0x00);			//... 2D Box On/OFF for 2DB3 for tw2835
	//Clear top Title
//	WriteOSDClr(PTH_Y,MASTER, 20, 11, WNDW_DS_SC_L+25, 12);
	//Clear bottom Title
//	WriteOSDClr(PTH_Y,MASTER, 7, 252, 80, 12);
	//Clear body Title
//	WriteOSDClr(PTH_Y,MASTER, 6, 32, 84, 220);
	//Clear bottom frame
//	WriteOSDClr(PTH_X,MASTER,0,18,179,5);
//	RemoveBox();
        //Main title setup
        if(language == 0)
        {
		WriteOSDStr(PTH_Y, MASTER,36, 11, 0x00, "MAIN MENU");
		WriteOSDStr(PTH_Y,MASTER,WNDW_DS_SC_H+23,WNDW_DS_SC_H +50 -N_P,0x00, "SYSTEM SETUP");
		//Display setup
		WriteOSDStr(PTH_Y,MASTER,WNDW_DS_SC_H+23, WNDW_DS_SC_H+70-N_P,0x00, "DISPLAY SETUP");
		//Auto setup
		WriteOSDStr(PTH_Y,MASTER,WNDW_DS_SC_H+23,WNDW_DS_SC_H +90-N_P,0x00, "AUTOSEQ SETUP");	
		WriteOSDStr(PTH_Y,MASTER,WNDW_DS_SC_H+23,WNDW_DS_SC_H +111-N_P,0x00, "CHANNEL SETUP");	   
		 //Motion setup  
		WriteOSDStr(PTH_Y,MASTER,WNDW_DS_SC_H+23,WNDW_DS_SC_H+130-N_P,0x00, "MOTION SETUP");	
		WriteOSDStr(PTH_Y,MASTER,WNDW_DS_SC_H+23,WNDW_DS_SC_H+150-N_P,0x00, "EVENT SETUP");
		//  FACTORY RESET
		WriteOSDStr(PTH_Y,MASTER,WNDW_DS_SC_H+23,WNDW_DS_SC_H+168-N_P,0x00, "EVENT REPORT");
        }else
        {
        	WriteOSDStr_24x24(PTH_Y, MASTER,39, 11, 0x00, ";  <");	
		WriteOSDStr_24x24(PTH_Y,MASTER,WNDW_DS_SC_H+25,WNDW_DS_SC_H +50 -N_P,0x00, "! \" # $");
		//Display setup
		WriteOSDStr_24x24(PTH_Y,MASTER,WNDW_DS_SC_H+25, WNDW_DS_SC_H+70-N_P,0x00, "= > # $");
		//Auto setup
		WriteOSDStr_24x24(PTH_Y,MASTER,WNDW_DS_SC_H+25,WNDW_DS_SC_H +90-N_P,0x00, "? @ # $");	
		WriteOSDStr_24x24(PTH_Y,MASTER,WNDW_DS_SC_H+25,WNDW_DS_SC_H +111-N_P,0x00, "% & # $");	   
		 //Motion setup  
		WriteOSDStr_24x24(PTH_Y,MASTER,WNDW_DS_SC_H+25,WNDW_DS_SC_H+130-N_P,0x00, ", - # $");	
		WriteOSDStr_24x24(PTH_Y,MASTER,WNDW_DS_SC_H+25,WNDW_DS_SC_H+150-N_P,0x00, "' ( # $");
		//  FACTORY RESET
		WriteOSDStr_24x24(PTH_Y,MASTER,WNDW_DS_SC_H+25,WNDW_DS_SC_H+168-N_P,0x00, "' ( ) +");
        }
		
	if(b_video_fmt == PAL) 
	{		// Set Background
		WriteOSDSqrX(MASTER, 0, 179, OSD_POS_V_ODD, OSD_POS_V_EVEN|30, 0x00, OSD_COL_BLK);
		WriteOSDSqrX(MASTER, 0, 179, 240, OSD_POS_V_EVEN|288, 0x00, OSD_COL_BLK);
	}
	else
	{ 		// Set Background
		WriteOSDSqrX(MASTER, 0, 179, OSD_POS_V_ODD, OSD_POS_V_EVEN|23, 0x00, OSD_COL_BLK);
		WriteOSDSqrX(MASTER, 0, 179, 210, OSD_POS_V_EVEN|240, 0x00, OSD_COL_BLK);
	}
	Up_Down_Font_display();
	Left_Right_Font_display(11);
	Select_Font_display(15);
	Enter_Font_display(40);
	Menu_Exit_Font_display(76);

}
#endif
#if 0
//==================================================================================
//
//
//
//
//
//==================================================================================
//... Page1 Menu Description
void menu_page1_system_setup_display()
{
	U8 N_P = 0;

	//Clear top Title
	WriteOSDClr(PTH_Y,MASTER, 20, 11, WNDW_DS_SC_L+25, 12);
	//Clear bottom Title
	WriteOSDClr(PTH_Y,MASTER, 7, 252, 82, 12);
	//Clear body Title
	WriteOSDClr(PTH_Y,MASTER, 6, 32, 82, 220);	

	if(b_video_fmt == NTSC)
		N_P = 12;
	if(language == 0)
	{
		WriteOSDStr(PTH_Y,MASTER,33,11,0x00, "SYSTEM SETUP");
		 //  DATE :  - -
		WriteOSDStr(PTH_Y,MASTER,22,62-N_P,0x00, "DATE:");
		WriteOSDStr(PTH_Y,MASTER,36,74-N_P,0x00, "-  -");
	       //  TIME :  HH:MM:SS
		WriteOSDStr(PTH_Y,MASTER,22, 98-N_P,0x00, "TIME:");
		WriteOSDStr(PTH_Y,MASTER, 34, 98-N_P,0x00, "H: M: S");
		WriteOSDStr(PTH_Y,MASTER, 36, 110-N_P,0x00, ":  :");

		WriteOSDStr(PTH_Y,MASTER,22, 134-N_P,0x00, "VIDEO FORMAT:");
//		WriteOSDStr(PTH_Y,MASTER,22, 146-N_P,0x00,"SYSTEM ID:");
		WriteOSDStr(PTH_Y,MASTER,22, 146-N_P,0x00,"LANGUAGE:");
		WriteOSDStr(PTH_Y,MASTER,22, 158-N_P,0x00, "KEY LOCK:");
		//  FACTORY RESET
		WriteOSDStr(PTH_Y,MASTER, 22, 182-N_P,0x00, "RESET:");
	}else
	{
		WriteOSDStr_24x24(PTH_Y,MASTER,36,11,0x00, "!\"#$");
		 //  DATE :  - -
		WriteOSDStr_24x24(PTH_Y,MASTER,22,62-N_P,0x00, "CD:");
		WriteOSDStr(PTH_Y,MASTER,36,74-N_P,0x00, "-  -");
	       //  TIME :  HH:MM:SS
		WriteOSDStr_24x24(PTH_Y,MASTER,22, 98-N_P,0x00, "HI:");
		WriteOSDStr_24x24(PTH_Y,MASTER, 33, 98-N_P,0x00, "H:J:K");
		WriteOSDStr(PTH_Y,MASTER, 36, 110-N_P,0x00, ":  :");

		WriteOSDStr_24x24(PTH_Y,MASTER,22, 134-N_P,0x00, "!\"");
		WriteOSDFntY_24x24(MASTER, 28, 134-N_P, 00, 0x66);
		WriteOSDFntY_24x24(MASTER, 31, 134-N_P, 00, 0x67);
		WriteOSDFntY_24x24(MASTER, 34, 134-N_P, 00, 0x1a);
		WriteOSDStr_24x24(PTH_Y,MASTER,22, 146-N_P,0x00,"QR:");
		WriteOSDStr_24x24(PTH_Y,MASTER,22, 158-N_P,0x00, "cde:");
		//  FACTORY RESET
		WriteOSDStr_24x24(PTH_Y,MASTER, 22, 182-N_P,0x00, "56#$:");
	}
}
//==================================================================================
//
//
//
//
//
//==================================================================================
//... Page2 Menu Description
void menu_page2_display_setup_display()
{
	U8 N_P = 0;

	//Clear top Title
	WriteOSDClr(PTH_Y,MASTER, 20, 11, WNDW_DS_SC_L+25, 12);
	//Clear bottom Title
	WriteOSDClr(PTH_Y,MASTER, 7, 252, 82, 12);
	//Clear body Title
	WriteOSDClr(PTH_Y,MASTER, 6, 32, 82, 220);
	//Display setup

	if(b_video_fmt == NTSC)
		N_P = 12;
	if(language == 0)
	{
		WriteOSDStr(PTH_Y,MASTER,32, 11, 0x00, "DISPLAY SETUP");
		//Display position 
		WriteOSDStr(PTH_Y,MASTER,22,62-N_P,0x00, "OSD DISPLAY");
		WriteOSDStr(PTH_Y,MASTER, 30, 74-N_P,0x00, "TITLE");
		WriteOSDStr(PTH_Y,MASTER, 44, 74-N_P,0x00, "DATE/TIME");
#ifdef VGA_DISPLAY
		WriteOSDStr(PTH_Y,MASTER, 22, 86-N_P,0x00, "SCREEN POSITION X:");
		WriteOSDStr(PTH_Y,MASTER, 54, 98-N_P,0x00, "Y:");
		WriteOSDStr(PTH_Y,MASTER, 22, 110-N_P,0x00, "VGA DISPLAY");
		WriteOSDStr(PTH_Y,MASTER, 30, 122-N_P,0x00, "800X600");
		WriteOSDStr(PTH_Y,MASTER, 48, 122-N_P,0x00, "1024X768");
#else
		WriteOSDStr(PTH_Y,MASTER, 22, 98-N_P,0x00, "SCREEN POSITION X:");
		WriteOSDStr(PTH_Y,MASTER, 54, 110-N_P,0x00, "Y:");
#endif		
		//Border color
		WriteOSDStr(PTH_Y, MASTER, 22, 134-N_P, 0x00, "BORDER COLOR");		
		WriteOSDStr(PTH_Y,MASTER, 30, 146-N_P, 0x00, "BLACK");	
		WriteOSDStr(PTH_Y,MASTER, 30, 158-N_P,0x00, "GRAY1");
		WriteOSDStr(PTH_Y,MASTER, 30, 170-N_P,0x00, "GRAY2");	
		WriteOSDStr(PTH_Y,MASTER, 30, 182-N_P,0x00, "WHITE");
		WriteOSDStr(PTH_Y,MASTER, 30, 194-N_P,0x00, "OFF");
	}else
	{
		WriteOSDStr_24x24(PTH_Y,MASTER,36, 11, 0x00, "=>#$");
		//Display position 
		WriteOSDStr_24x24(PTH_Y,MASTER,22,62-N_P,0x00, "=>#$");
		WriteOSDStr_24x24(PTH_Y,MASTER, 30, 74-N_P,0x00, "NO");
		WriteOSDStr_24x24(PTH_Y,MASTER, 44, 74-N_P,0x00, "CD");
		WriteOSDStr(PTH_Y,MASTER, 50, 74-N_P,0x00, "/");
		WriteOSDStr_24x24(PTH_Y,MASTER, 52, 74-N_P,0x00, "HI");
#ifdef VGA_DISPLAY
		WriteOSDStr_24x24(PTH_Y,MASTER, 22, 86-N_P,0x00, "LMY$ ");
		WriteOSDStr(PTH_Y,MASTER, 37, 86-N_P,0x00, "X:");
		WriteOSDStr(PTH_Y,MASTER, 37, 98-N_P,0x00, "Y:");		
		//vga mode
		WriteOSDStr(PTH_Y,MASTER, 22, 110-N_P,0x00, "VGA");
		WriteOSDStr_24x24(PTH_Y,MASTER,28,110-N_P,0x00, "#$");
		WriteOSDStr(PTH_Y,MASTER, 30, 122-N_P,0x00, "800X600");
		WriteOSDStr(PTH_Y,MASTER, 48, 122-N_P,0x00, "1024X768");
#else		
		WriteOSDStr_24x24(PTH_Y,MASTER, 22, 98-N_P,0x00, "LMY$ ");
		WriteOSDStr(PTH_Y,MASTER, 37, 98-N_P,0x00, "X:");
		WriteOSDStr(PTH_Y,MASTER, 37, 110-N_P,0x00, "Y:");
#endif		
		//Border color
		WriteOSDStr_24x24(PTH_Y, MASTER, 22, 134-N_P, 0x00, "fg#$");		
		WriteOSDStr_24x24(PTH_Y,MASTER, 30, 146-N_P, 0x00, "j");
		WriteOSDStr(PTH_Y,MASTER, 33, 146-N_P,0x00, "_");
		WriteOSDStr_24x24(PTH_Y,MASTER, 30, 158-N_P,0x00, "l");
		WriteOSDStr(PTH_Y,MASTER, 33, 158-N_P,0x00, "_");
		WriteOSDStr(PTH_Y,MASTER, 35, 158-N_P,0x00, "1");
		WriteOSDStr_24x24(PTH_Y,MASTER, 30, 170-N_P,0x00, "l");
		WriteOSDStr(PTH_Y,MASTER, 33, 170-N_P,0x00, "_");
		WriteOSDStr(PTH_Y,MASTER, 35, 170-N_P,0x00, "2");
		WriteOSDStr_24x24(PTH_Y,MASTER, 30, 182-N_P,0x00, "k");
		WriteOSDStr(PTH_Y,MASTER, 33, 182-N_P,0x00, "_");
		WriteOSDStr_24x24(PTH_Y,MASTER, 30, 194-N_P,0x00, "U");
	}
}

//==================================================================================
//
//
//
//
//
//==================================================================================
//... Page3 Menu Description
void menu_page3_camera_setup_display()
{
	U8 N_P = 0;
	
	WriteAsicByte(ALL_CHIP,DVC_PG2,0x5f,0xff);	//... 2D Box Gray Color
	
	//Clear top Title
	WriteOSDClr(PTH_Y,MASTER, 20, 11, WNDW_DS_SC_L+25, 12);
	//Clear bottom Title
	WriteOSDClr(PTH_Y,MASTER, 7, 252, 82, 12);
	//Clear body Title
	WriteOSDClr(PTH_Y,MASTER, 6, 32, 82, 220);		
	if(b_video_fmt == NTSC)
		N_P = 14;		 
	if(language == 0)
	{
		WriteOSDStr(PTH_Y,MASTER, 32, 11,0x00, "CHANNEL SETUP");
		WriteOSDStr(PTH_Y,MASTER, 12, 74-N_P,0x00, "CH:");

		WriteOSDStr(PTH_Y,MASTER, 42, 86-N_P,0x00, "TITLE:");
		WriteOSDStr(PTH_Y,MASTER, 42, 98-N_P,0x00, "BRIGHTNESS:");
		WriteOSDStr(PTH_Y,MASTER, 42, 110-N_P,0x00, "CONTRAST:");
		WriteOSDStr(PTH_Y,MASTER, 42, 122-N_P,0x00, "SATURATION:");
		WriteOSDStr(PTH_Y,MASTER, 42, 134-N_P,0x00, "HUE:");
		WriteOSDStr(PTH_Y,MASTER, 42, 146-N_P, 0x00, "SHARPNESS:");

		WriteOSDStr(PTH_Y,MASTER, 42, 170-N_P, 0x00, "H MIRROR:");
		WriteOSDStr(PTH_Y,MASTER, 42, 182-N_P, 0x00, "V MIRROR:");
	}else
	{
		WriteOSDStr_24x24(PTH_Y,MASTER, 36, 11,0x00, "%&#$");
		WriteOSDStr_24x24(PTH_Y,MASTER, 12, 74-N_P,0x00, "%&:");

		WriteOSDStr_24x24(PTH_Y,MASTER, 42, 86-N_P,0x00, "N O:");
		WriteOSDStr_24x24(PTH_Y,MASTER, 42, 98-N_P,0x00, "p q:");
		WriteOSDStr_24x24(PTH_Y,MASTER, 42, 110-N_P,0x00, "rsq:");
		WriteOSDStr_24x24(PTH_Y,MASTER, 42, 122-N_P,0x00, "tuq:");
		WriteOSDStr(PTH_Y,MASTER, 42, 134-N_P,0x00, "_ ");
		WriteOSDStr_24x24(PTH_Y,MASTER, 45, 134-N_P,0x00, " 2:");
		WriteOSDStr_24x24(PTH_Y,MASTER, 42, 146-N_P, 0x00, "vwq:");

		WriteOSDStr(PTH_Y,MASTER, 42, 170-N_P, 0x00, "H ");
		WriteOSDStr_24x24(PTH_Y,MASTER, 46, 170-N_P, 0x00, "oh:");
		WriteOSDStr(PTH_Y,MASTER, 42, 182-N_P, 0x00, "V ");
		WriteOSDStr_24x24(PTH_Y,MASTER, 46, 182-N_P, 0x00, "oh:");
	}

	Common_Font_display();
}

//==================================================================================
//
//
//
//
//
//==================================================================================
//... Page4 Menu Description
void menu_page4_auto_sequence_display()
{
	U8 N_P = 0;

	//Clear top Title
	WriteOSDClr(PTH_Y,MASTER, 20, 11, WNDW_DS_SC_L+25, 12);
	//Clear bottom Title
	WriteOSDClr(PTH_Y,MASTER, 7, 252, 82, 12);
	//Clear body Title
	WriteOSDClr(PTH_Y,MASTER, 6, 32, 82, 220);
	//Title
	if(b_video_fmt == NTSC) N_P = 12;
	if(language == 0)
		WriteOSDStr(PTH_Y,MASTER, 27, 11, 0x00, "AUTOSEQ TIME SETUP");
	else
		WriteOSDStr_24x24(PTH_Y,MASTER, 38, 11, 0x00, "?@#$");

	WriteOSDStr(PTH_Y,MASTER, 34, 62-N_P, 0x00, "CH 1-4:");
	WriteOSDStr(PTH_Y,MASTER, 34, 74-N_P, 0x00, "CH 1:");
	WriteOSDStr(PTH_Y,MASTER, 34, 86-N_P, 0x00, "CH 2:");
	WriteOSDStr(PTH_Y,MASTER, 34, 98-N_P, 0x00, "CH 3:");
	WriteOSDStr(PTH_Y,MASTER, 34, 110-N_P, 0x00, "CH 4:");

	WriteOSDStr(PTH_Y,MASTER, 34, 134-N_P,0x00, "CH 5-8:");
	WriteOSDStr(PTH_Y,MASTER, 34, 146-N_P,0x00, "CH 5:");
	WriteOSDStr(PTH_Y,MASTER, 34, 158-N_P,0x00, "CH 6:");	
	WriteOSDStr(PTH_Y,MASTER, 34, 170-N_P,0x00, "CH 7:");
	WriteOSDStr(PTH_Y,MASTER, 34, 182-N_P,0x00, "CH 8:");
	
	Common_Font_display();
}

//==================================================================================
//
//
//
//
//
//==================================================================================
//... Page6 Menu Description
void menu_page6_event_setup_display()
{
	U8 i, N_P = 0;
	
	WriteAsicByte(ALL_CHIP,DVC_PG2,0x5f,0xff);	//... 2D Box Gray Color
	
	//Clear top Title
	WriteOSDClr(PTH_Y,MASTER, 20, 11, WNDW_DS_SC_L+25, 12);
	//Clear bottom Title
	WriteOSDClr(PTH_Y,MASTER, 7, 252, 82, 12);
	//Clear body Title
	WriteOSDClr(PTH_Y,MASTER, 6, 32, 82, 220);
	if(b_video_fmt == NTSC) N_P = 16;
	if(language == 0)
	{
		WriteOSDStr(PTH_Y,MASTER, 34, 11, 0x00, "EVENT SETUP");	
		WriteOSDStr(PTH_Y,MASTER, 24, 76-N_P, 0x00, "BUZZER/REPORT CONTROL");

		WriteOSDStr(PTH_Y,MASTER, 14, 91-N_P, 0x00, "CH NO");
		WriteOSDStr(PTH_Y,MASTER, 14, 103-N_P, 0x00, "ALARM");
		WriteOSDStr(PTH_Y,MASTER, 14, 115-N_P, 0x00, "LOSS");
		WriteOSDStr(PTH_Y,MASTER, 14, 127-N_P, 0x00, "MOTION");
//		WriteOSDStr(PTH_Y,MASTER, 14, 127-N_P, 0x00, "CH NO");
//		WriteOSDStr(PTH_Y,MASTER, 14, 139-N_P, 0x00, "ALARM");
//		WriteOSDStr(PTH_Y,MASTER, 14, 151-N_P, 0x00, "LOSS");
//		WriteOSDStr(PTH_Y,MASTER, 14, 163-N_P, 0x00, "MOTION");
		
		WriteOSDStr(PTH_Y,MASTER, 20,172-N_P, 0x00, "BUZZER HOLD TIME:");
		WriteOSDStr(PTH_Y,MASTER, 20, 184-N_P, 0x00, "REPORT HOLD TIME:");
		WriteOSDStr(PTH_Y,MASTER, 20, 196-N_P, 0x00, "ALARM POLARITY:");
	}else
	{	
		WriteOSDStr_24x24(PTH_Y,MASTER, 38, 11, 0x00, "'(#$");	
		WriteOSDFntY_24x24(MASTER, 30, 64-N_P, 00, 0x60);
		WriteOSDFntY_24x24(MASTER, 33, 64-N_P, 00, 0x61);
		WriteOSDFntY_24x24(MASTER, 36, 64-N_P, 00, 0x62);
		WriteOSDStr(PTH_Y,MASTER, 39, 64-N_P, 0x00, "/");
		WriteOSDStr_24x24(PTH_Y,MASTER, 41, 64-N_P, 0x00, ")+#$");

		WriteOSDStr_24x24(PTH_Y,MASTER, 14, 91-N_P, 0x00, "%&");
		WriteOSDStr_24x24(PTH_Y,MASTER, 14, 103-N_P, 0x00, ")*");
		WriteOSDStr_24x24(PTH_Y,MASTER, 14, 115-N_P, 0x00, "EFG");
		WriteOSDStr_24x24(PTH_Y,MASTER, 14, 127-N_P, 0x00, ",-");
		
//		WriteOSDStr_24x24(PTH_Y,MASTER, 14, 127-N_P, 0x00, "%&");
//		WriteOSDStr_24x24(PTH_Y,MASTER, 14, 139-N_P, 0x00, ")*");
//		WriteOSDStr_24x24(PTH_Y,MASTER, 14, 151-N_P, 0x00, "EFG");
//		WriteOSDStr_24x24(PTH_Y,MASTER, 14, 163-N_P, 0x00, ",-");

		WriteOSDFntY_24x24(MASTER, 20, 172-N_P, 00, 0x60);
		WriteOSDFntY_24x24(MASTER, 23, 172-N_P, 00, 0x61);
		WriteOSDFntY_24x24(MASTER, 26, 172-N_P, 00, 0x62);		
		WriteOSDStr_24x24(PTH_Y,MASTER, 29,172-N_P, 0x00, "VWHI:");
		WriteOSDStr_24x24(PTH_Y,MASTER, 20, 184-N_P, 0x00, ") +VWHI:");
		WriteOSDStr_24x24(PTH_Y,MASTER, 20, 196-N_P, 0x00, ")*");
		WriteOSDFntY_24x24(MASTER, 26, 196-N_P, 00, 0x63);
		WriteOSDFntY_24x24(MASTER, 29, 196-N_P, 00, 0x64);
		WriteOSDStr_24x24(PTH_Y,MASTER, 32, 196-N_P, 0x00, ":");
	}
	for(i = 1;i <9;i++)     //Display 1 to 8
		WriteOSDFnt(PTH_Y, MASTER, 22+(i*6), 91-N_P, 0, i+ZERO_OFFSET);

	if(b_video_fmt == NTSC)	N_P = 8;
	if(b_video_fmt == PAL)
		WriteAsicByte(MASTER,DVC_PG2, 0x61, 0x0a);		//... 2D Box On/OFF
	else
		WriteAsicByte(MASTER,DVC_PG2, 0x61, 0x0c);		//... 2D Box On/OFF
	WriteAsicByte(MASTER,DVC_PG2, 0x60, 0x88);			//... Enable 2D Box0 on and mix on for x path 
	WriteAsicByte(MASTER,DVC_PG2, 0x64, 45-N_P);             //... VT
	WriteAsicByte(MASTER,DVC_PG2, 0x62, 25);                  //...HL
	WriteAsicByte(MASTER,DVC_PG2, 0x65, 11);                     //...VW
	WriteAsicByte(MASTER,DVC_PG2, 0x63, 54);                     //...HW
	WriteAsicByte(MASTER,DVC_PG2, 0x66, 0x03);                  //...V and H number

	if(b_video_fmt == PAL)
		WriteAsicByte(MASTER,DVC_PG2, 0x69, 0x0a);		 //... 2D Box On/OFF
	else		
		WriteAsicByte(MASTER,DVC_PG2, 0x69, 0x0c);		 //... 2D Box On/OFF
	WriteAsicByte(MASTER,DVC_PG2, 0x68, 0x88);			 //... Enable 2D Box1 On and mix on for x path
	WriteAsicByte(MASTER,DVC_PG2, 0x6c, 45-N_P);                   //...VT
	WriteAsicByte(MASTER,DVC_PG2, 0x6a, 53);                           //...HL
	WriteAsicByte(MASTER,DVC_PG2, 0x6d, 11);                           //...VW
	WriteAsicByte(MASTER,DVC_PG2, 0x6b, 23);                           //...HW
	WriteAsicByte(MASTER,DVC_PG2, 0x6e, 0x73);	             //...V and H number
}

//==================================================================================
//
//
//
//
//
//==================================================================================
//... Page7 Menu Description
void menu_page7_event_report_display()
{
	U8 N_P = 0;// temp =0x0a;

	WriteAsicByte(ALL_CHIP,DVC_PG2,0x5f,0xff);	//... 2D Box Gray Color	
	//Clear top Title
	WriteOSDClr(PTH_Y,MASTER, 20, 11, WNDW_DS_SC_L+25, 12);
	//Clear bottom Title
	WriteOSDClr(PTH_Y,MASTER, 7, 252, 82, 12);
	//Clear body Title
	WriteOSDClr(PTH_Y,MASTER, 6, 32, 82, 220);		
	if(b_video_fmt == NTSC)
		N_P = 20;
	if(language == 0)
	{
		WriteOSDStr(PTH_Y,MASTER, 33, 11, 0x00, "EVENT REPORT");
		WriteOSDStr(PTH_Y,MASTER, 66, 56-N_P, 0x00, "/6 PAGE");
	
//		WriteOSDStr(PTH_Y,MASTER, 10, 69-N_P,0x00, "NO");	
		WriteOSDStr(PTH_Y,MASTER, 42, 69-N_P, 0x00, " H: M: S");
//		WriteOSDStr(PTH_Y,MASTER, 64, 69-N_P, 0x00, "CH");
		WriteOSDStr(PTH_Y,MASTER, 70, 69-N_P, 0x00, "EVENT");

		WriteOSDStr(PTH_Y,MASTER, 22, 212-N_P,0x00, "LIST CLEAR:");
	}else
	{
		WriteOSDStr_24x24(PTH_Y,MASTER, 38, 11, 0x00, "'()+");
		WriteOSDStr(PTH_Y,MASTER, 66, 56-N_P, 0x00, "/6 ");
		WriteOSDStr_24x24(PTH_Y,MASTER, 72, 56-N_P, 0x00, "7");
	
//		WriteOSDStr_24x24(PTH_Y,MASTER, 10, 69-N_P,0x00, "mn");	
		WriteOSDStr_24x24(PTH_Y,MASTER, 44, 69-N_P, 0x00, "H:J:K");
//		WriteOSDStr_24x24(PTH_Y,MASTER, 64, 69-N_P, 0x00, "%&");
		WriteOSDStr_24x24(PTH_Y,MASTER, 73, 69-N_P, 0x00, "'(");

		WriteOSDFntY_24x24(MASTER, 22, 212-N_P, 00, 0x65);
		WriteOSDFntY_24x24(MASTER, 25, 212-N_P, 00, 0x66);
		WriteOSDStr_24x24(PTH_Y,MASTER, 28, 212-N_P,0x00, "89:");
	}
	WriteOSDStr(PTH_Y,MASTER, 10, 69-N_P,0x00, "NO");
	WriteOSDStr(PTH_Y,MASTER, 64, 69-N_P, 0x00, "CH");
	
	if(b_video_fmt == NTSC)
		N_P = 10;
	WriteAsicByte(ALL_CHIP,DVC_PG2, 0x60, 0x88);			//... Enable 2D Box0 on and mix on for x path
	WriteAsicByte(ALL_CHIP,DVC_PG2, 0x68, 0x88);			//... Enable 2D Box1 on and mix on for x path
	WriteAsicByte(ALL_CHIP,DVC_PG2, 0x70, 0x88);			//... Enable 2D Box2 on and mix on for x path
	WriteAsicByte(ALL_CHIP,DVC_PG2, 0x78, 0x88);			//... Enable 2D Box3 on and mix on for x path

	WriteAsicByte(ALL_CHIP,DVC_PG2, 0x61, 0x0a);			//... 2D Box On/OFF
	WriteAsicByte(ALL_CHIP,DVC_PG2, 0x69, 0x0a);			//... 2D Box On/OFF
	WriteAsicByte(ALL_CHIP,DVC_PG2, 0x71, 0x0a);			//... 2D Box On/OFF
	WriteAsicByte(ALL_CHIP,DVC_PG2, 0x79, 0x0a);			//... 2D Box On/OFF	
	
	WriteAsicByte(ALL_CHIP,DVC_PG2, 0x64, 34-N_P);			//... Vertical Top              ...VT
	WriteAsicByte(ALL_CHIP,DVC_PG2, 0x62, 17);			//... Horizontal Top          ...HL
	WriteAsicByte(ALL_CHIP,DVC_PG2, 0x65, 11);			//... Vertical Size             ...VW
	WriteAsicByte(ALL_CHIP,DVC_PG2, 0x63, 23);			//... Horizontal Size          ...HW
	WriteAsicByte(ALL_CHIP,DVC_PG2, 0x66, 0x0a);			//... Row/Colum Number

	WriteAsicByte(ALL_CHIP,DVC_PG2, 0x6C, 34-N_P);			//... Vertical Top             ...VT
	WriteAsicByte(ALL_CHIP,DVC_PG2, 0x6a, 29);			//... Horizontal Top          ...HL
	WriteAsicByte(ALL_CHIP,DVC_PG2, 0x6d, 11);			//... Vertical Size            ...VW
	WriteAsicByte(ALL_CHIP,DVC_PG2, 0x6b, 95);			//... Horizontal Size         ...HW
	WriteAsicByte(ALL_CHIP,DVC_PG2, 0x6e, 0x1a);			//... Row/Colum Number

	WriteAsicByte(ALL_CHIP,DVC_PG2, 0x74, 34-N_P);			//... Vertical Top
	WriteAsicByte(ALL_CHIP,DVC_PG2, 0x72, 125);			//... Horizontal Top
	WriteAsicByte(ALL_CHIP,DVC_PG2, 0x75, 11);			//... Vertical Size
	WriteAsicByte(ALL_CHIP,DVC_PG2, 0x73, 24);			//... Horizontal Size
	WriteAsicByte(ALL_CHIP,DVC_PG2, 0x76, 0x0a);			//... Row/Colum Number

	WriteAsicByte(ALL_CHIP,DVC_PG2, 0x7C, 34-N_P);			//... Vertical Top
	WriteAsicByte(ALL_CHIP,DVC_PG2, 0x7a, 138);			//... Horizontal Top
	WriteAsicByte(ALL_CHIP,DVC_PG2, 0x7d, 11);			//... Vertical Size
	WriteAsicByte(ALL_CHIP,DVC_PG2, 0x7b, 47);			//... Horizontal Size
	WriteAsicByte(ALL_CHIP,DVC_PG2, 0x7e, 0x0a);			//... Row/Colum Number
}
#endif

#if 0
//==================================================================================
//
//
//
//
//
//==================================================================================
void Up_Down_Font_display()
{
	U8 N_P =252;

	if(b_video_fmt == NTSC) N_P = 214;

	WriteOSDFnt(PTH_Y,MASTER, 7, N_P, OSD_NOR,0x02);
	WriteOSDFnt(PTH_Y,MASTER, 9, N_P, OSD_NOR,0x03);
}

//==================================================================================
//
//
//
//
//
//==================================================================================
void Left_Right_Font_display(U8 x_loc)
{
	U8 N_P =252;

	if(b_video_fmt == NTSC) N_P = 214;

	WriteOSDFnt(PTH_Y,MASTER,x_loc,N_P,OSD_NOR, 0x0a);
	WriteOSDFnt(PTH_Y,MASTER,(x_loc+2),N_P,OSD_NOR, 0x1d);
}

//==================================================================================
//
//
//
//
//
//==================================================================================
void Enter_Font_display(U8 x_loc)
{
	U8 N_P =252;

	if(b_video_fmt == NTSC) N_P = 214;

	if(language ==0)
		WriteOSDStr(PTH_Y,MASTER,x_loc,N_P,OSD_NOR, "ENTER");
	else
		WriteOSDStr_24x24(PTH_Y,MASTER,x_loc,N_P,OSD_NOR, "01");
}

//==================================================================================
//
//
//
//
//
//==================================================================================
void Menu_Exit_Font_display(U8 x_loc)
{
	U8 N_P =252;

	if(b_video_fmt == NTSC) N_P = 214;

	if(language == 0)
		WriteOSDStr(PTH_Y,MASTER,x_loc,N_P,OSD_NOR, "EXIT");
	else
		WriteOSDStr_24x24(PTH_Y,MASTER,x_loc,N_P,OSD_NOR, "45");
}
#endif
//==================================================================================
//
//
//
//
//
//==================================================================================
void Select_Font_display(U8 x_loc)
{
	U8 N_P =252;

	if(b_video_fmt == NTSC) N_P = 214;

	if(language == 0)
		WriteOSDStr(PTH_Y,MASTER,x_loc,N_P,OSD_NOR, "SELECT");
	else
		WriteOSDStr_24x24(PTH_Y,MASTER,x_loc,N_P,OSD_NOR, "./");
}

#if 0
//==================================================================================
//
//
//
//
//
//==================================================================================
void Adjust_Font_display(U8 x_loc)
{
	U8 N_P =252;

	if(b_video_fmt == NTSC) N_P = 214;

	if(language == 0)
		WriteOSDStr(PTH_Y,MASTER,x_loc,N_P,OSD_NOR,"ADJUST");
	else
		WriteOSDStr_24x24(PTH_Y,MASTER,x_loc,N_P,OSD_NOR,"23");
}
#endif
//==================================================================================
//
//
//
//
//
//==================================================================================
/*void Mask_Font_display()
{
	U8 N_P;

	if(b_video_fmt == PAL) N_P = 252;
	else N_P = 214;

	if(language == 0)
		WriteOSDStr(PTH_Y, MASTER, 40, N_P, OSD_NOR, "MASK  ");
	else
		WriteOSDStr_24x24(PTH_Y, MASTER, 40, N_P, OSD_NOR, "| }");
}
*/
//==================================================================================
//
//
//
//
//
//==================================================================================
/*void Unmask_Font_display()
{
	U8 N_P;

	if(b_video_fmt == PAL) N_P = 252;
	else N_P = 214;

	if(language == 0)
		WriteOSDStr(PTH_Y, MASTER, 40, N_P, OSD_NOR, "UNMASK");
	else
		WriteOSDStr_24x24(PTH_Y, MASTER, 40, N_P, OSD_NOR, "| }");
}
*/
#if 0
//==================================================================================
//
//
//
//
//
//==================================================================================
void Enable_Font_display(U8 on_off)
{
	U8 N_P =252;

	if(b_video_fmt == NTSC) N_P = 214;
	if(on_off == 1)
	{
		if(language ==0)
			WriteOSDStr(PTH_Y,MASTER, 42, N_P,OSD_NOR, "ON ");
		else
			WriteOSDStr_24x24(PTH_Y,MASTER, 42, N_P,OSD_NOR, "T");
	}else
	{
		if(language == 0)
			WriteOSDStr(PTH_Y,MASTER, 42, N_P,OSD_NOR, "OFF");
		else
			WriteOSDStr_24x24(PTH_Y,MASTER, 42, N_P,OSD_NOR, "U");
	}
}
#endif
//==================================================================================
//
//
//
//
//
//==================================================================================
/*void Clear_Font_display(U8 start_vl, U8 end_vl)
{
	U8 i, N_P =252;

	if(b_video_fmt == NTSC) N_P = 214;
	
	for(i=start_vl; i<end_vl;i++)
		WriteOSDFnt(PTH_Y,MASTER, i, N_P, OSD_NOR, BLANK_FONT);
}
*/
#if 0
//==================================================================================
//
//
//
//
//
//==================================================================================
void Common_Font_display()
{
	Up_Down_Font_display();
	Select_Font_display(11);
	Left_Right_Font_display(25);
	Adjust_Font_display(29);
	Menu_Exit_Font_display(76);
}
#endif
